Repository navigation
Surface: Add thermal sensors and fan speed for Pro 8, Laptop 4 (Intel) and Pro 7+ - #213
Open
larsschellhas wants to merge 3 commits into
Open
larsschellhas wants to merge 3 commits into
larsschellhas wants to merge 3 commits into
Conversation
…eed for Surface Pro 8
The Surface Pro 8 EC provides the same thermal sensor (TMP, function 2)
and fan speed (FAN, instance 1) interfaces as the newer devices that
already list them, but the Surface Pro 8 node group does not include
them. Add both nodes so that surface_temp and surface_fan can bind.
The group is used only for the ACPI ID MSHW0263, so no other device
gets the nodes. The platform profile node stays as it is, without the
has_fan property.
Evidence: a Surface Pro 8 (SKU Surface_Pro_8_1983, i7-1185G7, with the
Wi-Fi variant of the Windows power management configuration, kernel
7.3.6-1-surface) answered the read requests that the two drivers
send. They were sent through the SSAM debug device because the kernel
had no nodes for the device, in two runs a quarter of an hour apart:
- TMP 0x04 (available sensors), SAM target: mask 0x07ff, i.e. the
sensors 1 to 11.
- TMP 0x0e (name) for each of them: I_RTS1 to I_RTS8 and I_VTS1 to
I_VTS3, in the layout that surface_temp expects.
- TMP 0x01 (temperature) for each of them: 31 to 39 degrees C at idle.
During a CPU load of 150 s the readings rose (sensor 1 from 36 to
56 degrees C) and fell again afterwards.
- FAN 0x01, instance 1: 0 rpm at idle, about 3000 rpm under the same
load.
Not tested: no device has run a kernel with this patch, so the binding
of surface_temp and surface_fan to the nodes was not observed on a
Surface Pro 8. The LTE model is probably served by the same group, so it
would get the nodes too. Neither its ACPI ID nor its EC was measured.
The Windows driver package has one SAM firmware image for the Wi-Fi and
the LTE model, which suggests the same interfaces, but that is not a
measurement.
The analysis, the patch and this changelog were prepared with the help
of an AI coding assistant (Claude, Anthropic). The evidence is the
tester's report; I did not test on a Surface Pro 8 myself. I reviewed
the change.
Link: larsschellhas/linux-surface-power#4 (comment)
Link: larsschellhas/linux-surface-power#4 (comment)
Assisted-by: LLM checkpatch
Signed-off-by: Lars Schellhas van Kisfeld <lars.schellhas-van-kisfeld@schellhasconsulting.de>
…eed for Surface Laptop 4 (Intel)
The Surface Laptop 4 (Intel) EC provides the same thermal sensor (TMP,
function 2) and fan speed (FAN, instance 1) interfaces as the newer
devices that already list them, but its node group does not include
them. Add both nodes so that surface_temp and surface_fan can bind.
The Intel models use the ACPI ID MSHW0250, which shared
ssam_node_group_sl3_dptf with MSHW0110 (Surface Laptop 3 and 4, 15",
AMD). Give MSHW0250 a group of its own: it has every node of
ssam_node_group_sl3_dptf plus the two new ones. MSHW0110 keeps its
group unchanged. Update the comments of the group and of the ID list.
The Surface Laptop 4 models and where they end up:
13.5", Intel MSHW0250 new group ID: registry entry since 2021, and
the Windows driver package (below)
15", Intel MSHW0250 new group ID and readings measured (below)
15", AMD MSHW0110 unchanged ID: registry entry since 2021
13.5", AMD not known no registry entry names it
No model loses a node: a model on MSHW0250 gains the two nodes, a model
on MSHW0110 keeps what it had. The 15" Intel model was not named in
the comments before; it reports MSHW0250, so the ID list now names it.
The ACPI ID of the 13.5" AMD model is not known to me. If it is
MSHW0110, nothing changes for it. If it is MSHW0250, it gets the two
nodes without a measurement.
The Windows driver package for the Surface Laptop 4 with Intel processor
(26.091.11858.0) carries the power management configuration for the
13.5" and the 15" model. Its integration driver binds to ACPI\MSHW0250,
and to no other ID.
Evidence: a Surface Laptop 4 (15", Intel, SKU Surface_Laptop_4_1978:1979,
i7-1185G7, ACPI ID MSHW0250, kernel 7.2.15-4-omarchy, which has no nodes
for the device) answered the read requests that the two drivers send.
They were sent through the SSAM debug device:
- TMP 0x04 (available sensors), SAM target: mask 0x07f6, i.e. the
sensors 2, 3 and 5 to 11. surface_temp makes only the sensors in
the mask visible.
- TMP 0x0e (name) for each of them: I_RTS2, I_RTS3, I_RTS5 to I_RTS8
and I_VTS1 to I_VTS3, in the layout that surface_temp expects.
- TMP 0x01 (temperature) for each of them: 31 to 47 degrees C when the
run started. During a CPU load of 150 s the readings rose (sensor 2
from 47 to 60 degrees C).
- FAN 0x01, instance 1: about 4900 rpm when the run started and up
to about 7900 rpm under the load.
Not tested: no device has run a kernel with this patch, so the binding
of surface_temp and surface_fan to the nodes was not observed. Only the
15" Intel model was measured. The driver package has one SAM firmware
image for both sizes, which suggests the same interfaces on the 13.5"
model, but that is not a measurement.
The analysis, the patch and this changelog were prepared with the help
of an AI coding assistant (Claude, Anthropic). The evidence is the
tester's report; I did not test on a Surface Laptop 4 myself. I
reviewed the change.
Link: larsschellhas/linux-surface-power#6
Assisted-by: LLM checkpatch
Signed-off-by: Lars Schellhas van Kisfeld <lars.schellhas-van-kisfeld@schellhasconsulting.de>
…eed for Surface Pro 7+
The Surface Pro 7+ EC provides the same thermal sensor (TMP, function 2)
and fan speed (FAN, instance 1) interfaces as the newer devices that
already list them, but the Surface Pro 7+ node group does not include
them. Add both nodes so that surface_temp and surface_fan can bind.
The group is used only for the ACPI ID MSHW0119, so no other device
gets the nodes. The platform profile node stays as it is, without the
has_fan property.
Evidence: a Surface Pro 7+ (SKU Surface_Pro_7+_1960, i7-1165G7, ACPI ID
MSHW0119) answered the read requests that the two drivers send. They
were sent through the SSAM debug device because the kernel had no nodes
for the device:
- TMP 0x04 (available sensors), SAM target: mask 0x0fff, i.e. the
sensors 1 to 12. surface_temp supports up to 16.
- TMP 0x0e (name) for each of them: I_RTS1 to I_RTS8 and I_VTS1 to
I_VTS4, in the layout that surface_temp expects.
- TMP 0x01 (temperature) for each of them: 28.5 to 38.4 degrees C at
idle (kernel 7.3.6-arch1-1-surface).
- FAN 0x01, instance 1: 0 rpm at idle in the same run, and 3614 rpm in
an earlier run on the same device (kernel 7.3.4-arch1-2-surface).
Not tested: the temperatures were read once, at idle, without a load
run, so it was not observed that they follow the load. No device has
run a kernel with this patch, so the binding of surface_temp and
surface_fan to the nodes was not observed. Only this one device, a
model with a fan, was measured. Whether Surface Pro 7+ models without
a fan exist under the same ACPI ID, and what the fan request returns
there, is not known. If such a model does not answer, reading fan1_input
fails there; the node can then be restricted.
The analysis, the patch and this changelog were prepared with the help
of an AI coding assistant (Claude, Anthropic). The evidence is the
tester's reports; I did not test on a Surface Pro 7+ myself. I reviewed
the change.
Link: larsschellhas/linux-surface-power#2
Link: larsschellhas/linux-surface-power#2 (comment)
Assisted-by: LLM checkpatch
Signed-off-by: Lars Schellhas van Kisfeld <lars.schellhas-van-kisfeld@schellhasconsulting.de>
This was referenced Dec 2, 2026
Contributor
Author
|
Two things about the Surface Pro 8 that I found after opening this PR, and that belong here:
How would you like to handle the Pro 8? I can drop commit 1 from this PR, so that the Pro 8 comes with Emfox's patch, or keep it and add a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The EC of the Surface Pro 8, the Surface Laptop 4 (Intel) and the Surface Pro 7+ answers the same thermal sensor (TMP, function 2) and fan speed (FAN, instance 1) requests as the devices that already list the nodes (Surface Book 3 since #190, Pro 9/10/11, Laptop 5/6, Studio 2). The registry groups of these three devices don't include them, so
surface_tempandsurface_fannever bind. The sensors are wanted by a user-space implementation of the Windows power management (linux-surface/linux-surface#2383), which reads two of them as inputs and so far has no kernel source for them on these devices.This PR has three commits, one per device, so that each can be taken or dropped on its own:
ssam_node_group_sp8getsssam_node_tmp_sensorsandssam_node_fan_speed. The group serves onlyMSHW0263.MSHW0250,ssam_node_group_sl4: every node ofssam_node_group_sl3_dptfplus the two new ones.MSHW0110(Laptop 3 and 4, 15", AMD) stays onsl3_dptfunchanged.ssam_node_group_sp7_dptf(onlyMSHW0119) gets both nodes.No
has_fanand no other property is added; the platform profile nodes are unchanged.Surface Laptop 4 models. No model loses a node; a model on
MSHW0250gains the two nodes:MSHW0250sl4ACPI\MSHW0250onlyMSHW0250sl4MSHW0110sl3_dptf, unchangedMSHW0110, nothing changes; if it isMSHW0250, it gets the nodes without a measurementEvidence. The three devices were not run with these patches. Their owners ran a read-only probe that sends the requests
surface_tempandsurface_fansend (TMP0x04,0x0e,0x01on the SAM target, instance 0; FAN0x01, instance 1) through the SSAM debug device and recorded the raw answers. The reports are linked in the commits.Surface_Pro_8_1983, i7-1185G70x07ffI_RTS1–I_RTS8,I_VTS1–I_VTS3Surface_Laptop_4_1978:1979, i7-1185G70x07f6Surface_Pro_7+_1960, i7-1165G70x0fffI_RTS1–I_RTS8,I_VTS1–I_VTS4surface_temponly shows sensors in the mask.Open points, so that nobody has to guess:
MSHW0119, and what the fan request returns there, is not known to me.surface_fansends no request at probe, so such a model would get afan1_inputwhose read fails. This follows Surface Book 3: Add thermal sensors and fans (main and base) #190, where the Surface Book 3 group (MSHW0117, 13.5" and 15") got the nodes with only the 15" measured. If someone reports a failing read, the node can be restricted.checkpatch.pl --strictreports no errors, warnings or checks for the three patches. The file builds withW=1and no warnings at each of the three commits (out of tree, against the headers of 7.3.6-1-surface).slg1) and hwmon: surface_temp: Expose sensor 9 offset via HWMON_T_OFFSET #212 (surface_tempand, in this file, the Laptop Go groups and atmp_sensors_with_offsetnode) don't touch the groups changed here. I compared the hunks by reading them; a trial merge was not completed, so a rebase may still need a look.The analysis, the patches and the changelogs were prepared with the help of an AI coding assistant (Claude, Anthropic). I reviewed the changes. I did not run them on the devices: the readings come from the testers' reports.